
<script>
export default {
  // eslint-disable-next-line vue/multi-word-component-names
  name: 'Formatter',
  props: {
    callback: {
      type: Function
    },
    row: {
      type: Object
    }
  },
  render (h) {
    if (this._props.callback) {
      const renderData = this._props.callback({ h, row: this._props.row })
      if (typeof renderData === 'string') { return h('span', renderData) } else return renderData
    } else {
      return ''
    }
  }
}
</script>

<style scoped>

</style>
